package us.mooresr.aircraftscheduling.client;

import us.mooresr.aircraftscheduling.client.events.UserLoggedInEvent;
import us.mooresr.aircraftscheduling.client.events.UserLoggedInEventHandler;

import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.gwtplatform.mvp.client.proxy.Gatekeeper;

@Singleton
public class AdminGatekeeper implements Gatekeeper {
	
	private final LoginStateManager loginStateManager;
	
	@Inject
	public AdminGatekeeper(LoginStateManager loginStateManager) {
		this.loginStateManager = loginStateManager;
	}

	@Override
	public boolean canReveal() {
		
		return loginStateManager.isAdmin();
	}

}
